<template>
	<view>
		<view class="list u-padding-50">
			
			<view class="item"  @click="item(0)">
				<view class="u-font-xl u-text-center  u-m-b-20">顺序练题</view>
				<u-line-progress active-color="#2979ff" :percent="Math.floor((orderRecord/count) *100)"></u-line-progress>
			</view>
			<view class="item" @click="item(1)">
				<view class="u-font-xl u-text-center u-m-20">模拟考试</view>
				<u-line-progress active-color="#2979ff" :percent="examRecord"></u-line-progress>
			</view>
			
<!-- 			<view class="item">
				<view class="u-font-xl u-text-center u-m-20">我的收藏</view>
				<u-line-progress active-color="#2979ff" :percent="0"></u-line-progress>
			</view> -->
			
			<view class="item" @click="item(3)">
				<view class="u-font-xl u-text-center u-m-20">错题本</view>
				<u-line-progress active-color="#2979ff" :percent="0"></u-line-progress>
			</view>
			
			<view class="item" @click="item(4)">
				<view class="u-font-xl u-text-center u-m-20">修改车型</view>
				<u-line-progress active-color="#2979ff" :percent="0"></u-line-progress>
			</view>
				
			
		</view>
		
	</view>
</template>

<script>
	export default {
		props:['orderRecord','count','examRecord'],
		data() {
			return {
				
			}
		},
		methods: {
			item(i){
				switch(i){
					case 0:
						this.$u.route({
							url: 'pages/order/order',
							params: {
								km: this.vuex_user.model + 1
							}
						});
						break;
					case 1:
						this.$u.route({
							url: 'pages/exam/exam',
							params: {
								km: this.vuex_user.model + 1
							}
						});
						break;	
					case 3:
						this.$u.route({
							url: 'pages/errorBook/errorBook',
							params: {
								km: this.vuex_user.model + 1
							}
						});
						break;	
					case 4:
						this.$u.route({
							url: 'pages/model/model',
							params: {
								blak: 1
							}
						});
						break;
				}
			}
		}
	}
</script>

<style lang="scss">
	.list{
		.item{
			
		}
	}
</style>
